1. Field of the Invention
The present invention relates to a barcode reading apparatus and a computer program product.
2. Description of the Related Art
Conventionally, there is known a two dimensional imager device for capturing a barcode as a symbol and scanning the barcode. Regarding the imager device, degradation of a captured image is determined by degradation ability depending on angle of view and number of pixels and optical degradation depending on focus position, and the degradation is substantially ability to read barcode (reading depth ability). In a conventional imager device, since the angle of view and focus position are fixed, reading ability is characterized by the manner of setting such as high resolution compliant module and long distance compliant module.
In order to enhance the reading depth ability, an imager module which further includes an automatic focus mechanism using a solid lens similar to a camera is developed.
FIG. 17 is a diagram showing an optical system of an imager module including a conventional automatic focus mechanism. As shown in FIG. 17, the imager module including a conventional automatic focus mechanism is composed of an imaging element 211A, lens 31 and driving mechanism of lens 31 (not shown). The lens 31 is a solid lens including plastic, etc. The lens 31 is a plurality of lenses combined and is shown as one lens. When focus is adjusted, the entire lens 31 physically (mechanically) moves with respect to an optical axis with the driving mechanism to perform optical adjustment.
However, the imager module including the conventional automatic focus mechanism performs focus adjustment based on a captured image similar to a camera and such method takes time to obtain a clear image. Therefore, performance of response as a scanner decreases.
There is also known an exposing device for a laser printer employing a liquid lens instead of a solid lens (for example, see Japanese Patent Application Laid-Open Publication No. 2007-152766). The ability of the liquid lens as a lens is not as high as the solid lens. However, the liquid lens has characteristics such as, since the liquid lens does not use mechanical components, the ability of impact resistance is high and the speed of focus adjustment is fast. Therefore, the liquid lens is considered to be suitable for an embedded device.
Moreover, an imager device in which focus depth is deeper than the liquid lens is known (for example, see Japanese Patent Application Laid-Open Publication No. 11-203383). Further, lately, an imager module employing a liquid lens device as one of the automatic focus mechanisms is being developed.
However, the imager device including the conventional automatic focus mechanism using the liquid lens substitutes the solid lens in the conventional automatic focus mechanism with the liquid lens. Therefore, the imager device including the conventional automatic focus mechanism using the liquid lens includes the characteristic of high speed focus adjustment due to the liquid lens, however, the ability of response (scanning time) as a scanner is lower compared to the fixed focus imager.
Here, an example of a process of reading (scanning) a barcode with an imager device including a conventional automatic focus mechanism is described with reference to FIG. 18.
FIG. 18 is a diagram describing an example of a process of reading a barcode with an imager device including a conventional automatic focus mechanism.
An example of reading a barcode B3 at a distance corresponding to focus position F3 and a barcode B1 at a distance corresponding to focus position F1 in order as shown in FIG. 18 is considered. The focus positions F1, F2, F3 and F4 are four levels of focus positions of a liquid lens where an object is aligned from a close position to a far position in order.
In the imager device, the position of the liquid lens is adjusted to the focus position F1 after scanning starts and image capturing and decoding of the barcode B3 is performed. Then, when the barcode image of the obtained image data is unfocused and decoding fails, the position of the liquid lens is adjusted to focus position F2 and image capturing and decoding of the barcode B3 is performed. Then, when the barcode image of the obtained image data is unfocused and decoding fails, the position of the liquid lens is adjusted to focus position F3 and image capturing and decoding of the barcode B3 is performed. Then, when the barcode image of the obtained image is focused and decoding succeeds, the reading of the barcode B3 finishes.
Similarly, the focus position adjustment of the liquid lens, image capturing, and decoding is performed corresponding to change of the focus position from F3 to F4 and to F1. As described above, regarding the imager device including the conventional automatic focus mechanism, the image capturing and decoding is performed many times, and such process is also time consuming. Therefore, there is a demand to shorten time consumed in barcode reading.